package MapEditor.Editor
{
	import MapEditor.MapEditor;
	
	import flash.display.Sprite;
	import flash.events.MouseEvent;

	public class EventEditor
	{
		
		private var _content:Sprite = null;
		private var _parent:MapEditor = null;
		
		public function EventEditor(_c:Sprite,_d:MapEditor)
		{
			this._content = _c;
			this._content.visible = false;
			this._parent = _d;
			
			this._parent.ControlMgr.getButton(this._content["CLOSE"]).setOnClickFun(close);
			this._parent.ControlMgr.getButton(this._content["ON_CONFIREM"]).setOnClickFun(onConfirem);
		}
		
		private function close():void
		{
			this._content.visible = false;
		}
		
		private function onConfirem():void
		{
			
		}
		
		public function onShow(e:MouseEvent):void
		{
			this._content.visible = true;
			this._content.parent.addChild(this._content);
		}
		
		public function get content():Sprite
		{
			return this._content;
		}
	}
}